/**
 * @author (Jeff Thomas) 
 * @version (11.21.2007)
 */
public class FilteredAccount extends Account {
    //instance variables
    private double countFiltered;
    private double countTotal;
    //constructor
    public FilteredAccount(Client c) {
        super(c);
        countFiltered = 0.0;
        countTotal = 0.0;
    }
    //process next transaction
    public boolean process(Transaction t){
        if (t.value() == 0.0) {
            countFiltered += 1;
            countTotal += 1;
            return true;
        }
        else {
            countTotal += 1;
            return super.process(t)
        }
    //returns percent of transactions filtered
    public double percentFiltered() {
        return countFiltered / countTotal;
    }
}
    